<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用 clip-path 和 border-image 实现圆角渐变边框</title>
    <style>
        body,html{
            width: 100%;
            min-height: 100%;
            display: flex;
        }
        .border-image-clip-path{
            width: 200px;
            height: 100px;
            margin: auto;
            border: 10px solid;
            border-image: linear-gradient(45deg , gold,deeppink) 1;
            /* 因为使用border-iamge的时候border-radius不生效，所以用clip-path做圆角效果 */
            clip-path:inset(0px round 10px);
            animation: huerotate 6s infinite linear;
            filter: hue-rotate(360deg);
        }
        @keyframes huerotate {
            0%{
                filter: hue-rotate(0deg);
            }
            100%{
                filter: hue-rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <div class="border-image-clip-path"></div>
</body>
</html>